import Vue from 'vue'
import Router from 'vue-router'
import Home from "@/views/home/index"
import My from '@/views/my/index'
import MyList from '@/views/mylist/index'
import MyGarbageList from '@/views/garbageList/index'
import Login from '@/views/login/index'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: Home
    },
    {
      path: '/login',
      component:Login
    },
    {
      path:'/my',
      component:My,
      redirect:'/my/list',
      children:[
        {
          path:'list',
          component:MyList,
          meta: { isGarbage: false }
        },
        {
          path:'garbageList',
          component:MyGarbageList,
          meta: { isGarbage: true }
        }
      ]
    }
  ]
})
